package com.example.qihuibao.constant

import com.example.qihuibao.XApplication
import com.example.qihuibao.bean.*
import com.example.qihuibao.dao.*
import com.google.gson.Gson
import java.text.SimpleDateFormat

object Global {
    const val _5S = 5
    const val _30S = 30
    const val _60S = 60
    var hasPresentation = false
    var isPresentationForBScreen = false//和设备型号有关
    var networkOk = true
    var workMode = 0
    var devIp = ""

    val dateFormat = SimpleDateFormat("yyyyMMdd")
    val timeFormat = SimpleDateFormat("HHmmss")
    val dateTimeFormat = SimpleDateFormat("yyyyMMddHHmmss")

    //cache
    var rspQueryEnterpriseInfoBean : RspQueryEnterpriseInfoBean? = null
    var currentCanteenInfoBean : RspQueryCanteenInfoBean? = null
    var rspQueryMealInfoBeans : List<RspQueryMealInfoBean>? = null
    var currentMealInfoBean : RspQueryMealInfoBean? = null
    var totalOrder = 0
    var totalUse = 0
    var totalNoWriteOff = 0
//    var employs:List<RspQueryEmployInfoBean.Employ>? = null

    var devStat = DevStat.STARTUP
    var pageId = 0

    val facePath = XApplication.application.filesDir.path + "/face/"

    val gson = Gson()

    val CLIENT_REQ_HEAD = "#client_req#"
    val STATION_RSP_HEAD = "#station_rsp#"
    val SOCKET_HEARTBEAT_SEND = "#hb-S#"
    val SOCKET_HEARTBEAT_RECEIVE = "#hb-R#"

    var serverUrl = "http://default"//域名
    var CorpID = ""//企业ID
    var canteenId = ""//餐厅ID
    var CorpName = ""//企业名称
    var CorpKey = ""//企业密钥

    var connectStation = false
    var connectICBC = true
}